<?php


namespace App\Model\Mysql;


use EasySwoole\Mysqli\QueryBuilder;

class UserInviteModel extends BaseModel
{
    protected $tableName = 'pro_user_invite';
    protected $autoTimeStamp = true;

    public function user($field = '*')
    {
        return $this->hasOne(UserModel::class, function (QueryBuilder $query) use ($field) {
            $query->fields($field);
            return $query;
        }, 'user_id', 'id');
    }

}